home *** CD-ROM | disk | FTP | other *** search
/ CD-ROM Magazin 1997 March / Image.iso / schwieri.dxr / Schwierigk_25_main SchwierigkM.ls < prev    next >
Encoding:
Text File  |  1996-10-28  |  887 b   |  43 lines

  1. global gDragging, gDifficulty
  2.  
  3. on keyUp
  4.   if charToNum(the key) = 27 then
  5.     Abwischen()
  6.     go("Wett", "WD.dir")
  7.   end if
  8. end
  9.  
  10. on mouseDown
  11.   if rollOver(16) then
  12.     set gDragging to 1
  13.     setCursor(["CursorGrabbed", "CursorGrabbedMask"])
  14.   end if
  15. end
  16.  
  17. on mouseUp
  18.   if gDragging then
  19.     set gDragging to 0
  20.     resetCursor()
  21.   end if
  22. end
  23.  
  24. on exitFrame
  25.   if gDragging then
  26.     if (the mouseH < (the locH of sprite 16 - (74 / 2))) and (the frame > label("SchwM1")) then
  27.       playsound(2, "SchiebeRegler")
  28.       set gDifficulty to gDifficulty - 1
  29.       go(the frame - 1)
  30.     else
  31.       if (the mouseH > (the locH of sprite 16 + (74 / 2))) and (the frame < (label("SchwM1") + 6)) then
  32.         playsound(2, "SchiebeRegler")
  33.         set gDifficulty to gDifficulty + 1
  34.         go(the frame + 1)
  35.       else
  36.         go(the frame)
  37.       end if
  38.     end if
  39.   else
  40.     go(the frame)
  41.   end if
  42. end
  43.